#pragma once

namespace Melting
{ 
	//static inline UINT8* AlignedMalloc( UINT32 _iBlockSize, UINT32 _iAlignment )
	//{
	//	UINT8* pMemory = (UINT8*) malloc( _iBlockSize + _iAlignment );

	//	UINT8* pAlignedMemory = (UINT8*)((UINT32)( pMemory + _iAlignment ) & ( ~ (_iAlignment - 1 ) ));

	//	// safe, because adding _iAlignment instead of (_iAlignment-1) guarantees it is past the actual start of the maloc'ed block.
	//	*(pAlignedMemory - 1) = pAlignedMemory - pMemory;

	//	return pAlignedMemory;
	//}

	//static inline void AlignedFree( UINT8* _pAlignedMemory )
	//{
	//	UINT8 iOffset = *(_pAlignedMemory - 1);
	//	free( (void*)(_pAlignedMemory - iOffset) );
	//}
		 
}